package com.mt.mtyx.common.utils.generate.generate.config;

import java.util.Set;

/**
 * @author WMT
 * @Date 2023/5/26 17:27
 */
public class EntityCodeConfig {

    /**
     * 是否开启lombok
     */
    private boolean enableLombok;

    /**
     * 是否开启序列化
     */
    private boolean enableSerialVersionUID;

    /**
     * 是否忽略父类属性
     */
    private boolean ignoredSupperField;

    /**
     * 是否开启tosString方法
     */
    private boolean enableToString;

    /**
     * 是否开启mybatis字段属性注解
     */
    private boolean enableTableFieldAnnotation = true;

    /**
     * entity名称
     */
    private String entityName;

    /**
     * entity格式
     */
    private String entityFormat = "%sEntity";

    /**
     * 父类包名
     */
    private String supperCLass;

    /**
     * entity 导包
     */
    private Set<String> importPackage;


    public EntityCodeConfig enableLombok(boolean enableLombok) {
        this.enableLombok = enableLombok;
        return this;
    }

    public EntityCodeConfig enableSerialVersionUID(boolean enableSerialVersionUID) {
        this.enableSerialVersionUID = enableSerialVersionUID;
        return this;
    }

    public boolean isIgnoredSupperField() {
        return ignoredSupperField;
    }

    public EntityCodeConfig enableIgnoredSupperField(boolean ignoredSupperField) {
        this.ignoredSupperField = ignoredSupperField;
        return this;
    }

    public EntityCodeConfig enableToString(boolean enableToString) {
        this.enableToString = enableToString;
        return this;
    }

    public EntityCodeConfig enableTableFieldAnnotation(boolean enableTableFieldAnnotation) {
        this.enableTableFieldAnnotation = enableTableFieldAnnotation;
        return this;
    }

    public EntityCodeConfig entityName(String entityName) {
        this.entityName = entityName;
        return this;
    }

    public EntityCodeConfig entityFormat(String format) {
        this.entityFormat = format;
        return this;
    }

    public EntityCodeConfig supperCLass(String supperCLass) {
        this.supperCLass = supperCLass;
        return this;
    }

    public EntityCodeConfig supperCLass(Class<?> clazz) {
        this.supperCLass = clazz.getName();
        return this;
    }

    public EntityCodeConfig ignoredSupperField(boolean ignoredSupperField) {
        this.ignoredSupperField = ignoredSupperField;
        return this;
    }

    public EntityCodeConfig importPackage(Set<String> importPackage) {
        this.importPackage = importPackage;
        return this;
    }

    public Set<String> getImportPackage() {
        return importPackage;
    }

    public boolean isEnableToString() {
        return enableToString;
    }

    public boolean isEnableLombok() {
        return enableLombok;
    }

    public boolean isEnableSerialVersionUID() {
        return enableSerialVersionUID;
    }

    public boolean isEnableTableFieldAnnotation() {
        return enableTableFieldAnnotation;
    }

    public String getEntityName() {
        return entityName;
    }

    public String getEntityFormat() {
        return entityFormat;
    }

    public String getSupperCLass() {
        return supperCLass;
    }
}
